<template>
<div class="personal-wrap">
	<div v-title style="display: none">个人信息</div>
	<personalBound v-show="bound" :name="this.name" :idcard="this.idcard"></personalBound>
	<personalUnbound v-show="unbound"></personalUnbound>
</div>
</template>
<script type="text/ecmascript-6">
import personalUnbound from 'components/personalUnbound/personalUnbound';
import personalBound from 'components/personalBound/personalBound';
  export default {
    props: {
    },
    data() {
      return {
        bound: '',
        unbound: '',
        idcard: '',
        name: ''
      };
    },
    created() {
		this.$http.post('api/login/userinfo/', {mobile: window.localStorage.cphone}).then(response => {
			this.idcard = response.body.data.idcard_num;
			this.name = response.body.data.real_name;
			if (response.body.data.idcard_num !== '') {
				this.bound = 'true';
				this.unbound = '';
			} else {
				this.bound = '';
				this.unbound = 'true';
			}
		});
    },
    components: {
      personalUnbound,
      personalBound
    }
  };
</script>
<style lang="stylus" rel="stylesheet/stylus">
  @import "../../common/stylus/mixin.styl"
  @import "../../common/stylus/car.styl"
  /* 主要文字 黑 $main-fn
     次要文字 灰 $se-fn
     预填文字 灰 $pre-fn
     描边 灰 $border 
     背景 灰白 $bg 
     主题 红 $theme
     辅助 蓝 $assist */
</style>